import http from '@/common/service/service.js';

export default {
	getCourseInfo(params) {
		return http.get('/course/info', params);
	},
	pageCourse(params) {
		return http.get('/course/page', params);
	},
	pageCourseProgress(params) {
		return http.get('/course/page-progress', params);
	},
	listFixedCourse(params) {
		return http.get('/course/list/fixed', params);
	},
	listPushCourse(params) {
		return http.get('/course/list/push', params);
	},




	joinCourse(params) {
		return http.post('/course/user/join', params)
	},
	collectOrCancelCourse: (params) => {
		return http.get('/course/user/collectOrCancel', params)
	},
	fixCourseOrCancel(params) {
		return http.get('/course/user/fixedOrCancel', params);
	},




	//获取公告
	listNotice(params) {
		return http.get('/course/notice/list', params)
	},
	// 获取章节信息
	getSimpleCourseDirs(params) {
		return http.get('/course/getSimpleCourseDirs', params);
	},
	// 获取章节信息（带进度）
	getDetailCourseDirs(params) {
		return http.get('/course/getDetailCourseDirs', params);
	},






	//获取评价分页
	pageCourseEvaluation: (params) => {
		return http.get('/course/user/evaluation/page', params)
	},
	likeOrCancelEvaluation(params) {
		return http.get('/course/evaluation/likeOrCancel', params);
	},






	getSectionStudyInfo(params) {
		return http.get('/section/study',params);
	},
	getSectionContentInfo(params) {
		return http.get('/section-content/info',params);
	},
	addTalk(data){
		return http.post('/section/talk/add', data);
	},
	addSectionContentComment(data){
		return http.post('/section-content/comment/add', data);
	},
	addSectionContentCommentWind(params){
		return http.get('/section-content/comment/wind', params);
	},
	updateProgress: (params) => {
		return http.get('/section/progress/update', params)
	},


















	pageMineCourseComment(params){
		return http.get('/section-content/comment/pageMineOrderByTime', params)
	},

	pageCourseComment(params){
		return http.get('/section-content/comment/pageOrderByTime', params)
	},

	manageUpdateCourseComment(params){
		return http.post('/manage/section-content/comment/update', params)
	},
	manageRemoveCourseComment(params){
		return http.get('/manage/section-content/comment/remove', params)
	},
	
	pageCourseTalk(params){
		return http.get('/manage/section/talk/page', params)
	},
	
	manageUpdateCourseTalk(params){
		return http.post('/manage/section/talk/update', params)
	},
	manageRemoveCourseTalk(params){
		return http.get('/manage/section/talk/remove', params)
	},



	// 测试相关
	queryCourseExams(params) {
		return http.get('/exam/queryCourseExams', params);
	},
	queryExamRecordInfo: (params) => {
		return http.get('/exam/record/info', params);
	},
	createExamRecord: (data) => {
		return http.post('/exam/record/create', data);
	},
	submitExam: (params) => {
		return http.post('/exam/record/submit', params);
	},
	retryExam: (params) => {
		return http.put('/exam/retry', params)
	},
	getProblemInfo: (params) => {
		return http.get('/problem/info', params)
	},




	// 管理
	managePageCourseComment(params){
		return http.get('/manage/section-content/comment/page', params)
	},
	
	
	
	
	
	
	
	getCourseManageInfo(params) {
		return http.get('/manage/course/info', params);
	},
	updateCourseInfo(params) {
		return http.post('/manage/course/update', params)
	},
	pageReport(params){
		return http.get('/manage/audit/report/list', params)
	},
	pageCheck(params){
		return http.get('/manage/audit/check/list', params)
	},
	
	
	unbindCourse(params) {
		return http.get('/manage/course/user/unbind', params)
	},
	bindCourse(params) {
		return http.post('/manage/course/user/bind', params)
	},
	courseUserPage(params) {
		return http.get('/manage/course/user/page',params)
	},
	updateCourseUserRole(params){
		return http.get('/manage/course/user/update-role', params)
	},


	getBasicVOListByCourseId(params) {
		return http.get('/manage/section/basic-list-by-courseId', params);
	},


}
